package com.wgchao.identityrightsmanagement.infrastructure.jpa.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 * @ClassName: SysBaseDepartmentOffice
 * @author: wgchao
 * @createTime: 2020/6/17 9:22 AM
 * @Description: TODO
 */
@Table(name = "sys_base_department_office", uniqueConstraints = @UniqueConstraint(columnNames = {"identify"}))
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysBaseDepartmentOffice {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id" )
    private Long id;

    @Column(name = "identify", length = 100)
    private String identify;

    //部门编号
    @Column(name = "department_code", length = 50)
    private String departmentCode;

    //职位编号
    @Column(name = "office_code", length = 50)
    private String officeCode;

    @Version
    private Long version;
}
